Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spec for Quantized Types and Constants #1161

Closed
wants to merge 1 commit into from

Conversation

subhankarshah
Copy link
Member

closes #588

@subhankarshah subhankarshah marked this pull request as draft February 13, 2023 16:29
@burmako burmako self-requested a review February 13, 2023 20:04
@burmako burmako self-assigned this Feb 13, 2023
@burmako
Copy link
Contributor

burmako commented Feb 14, 2023

@subhankarshah Thank you for your contribution! This is a valuable step towards documenting quantization exactly as it is informally implemented in the StableHLO dialect at the moment (although this PR alone won't be able to close #588, because subsequent steps will be needed to specify which operations allow quantized inputs and output and then define their behavior).

However, given that there's an ongoing RFC that touches quantization (#1149), let's put this pull request on hold until we complete the discussion of that RFC.


```
scale = (alpha - beta) / (max_val - min_val)
zero_point = min_val - round(beta * scale)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beta/scale?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes

@sdasgup3 sdasgup3 assigned sdasgup3 and unassigned burmako Feb 16, 2023
@burmako
Copy link
Contributor

burmako commented Feb 22, 2023

Closing this PR for now while we're figuring out the next steps for speccing quantization. Thanks again for your work - we will use it as a reference one way or another!

@burmako burmako closed this Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spec quantization
3 participants